<%-- 
    Document   : Persona
    Created on : 04-jul-2011, 20:10:53
    Author     : rodrifonsi
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <title>JSP Page</title>
        </head>
        <body>
            <h:form>
                <h1><h:outputText value="Curso de MVC con JSF 2.0"/></h1>
                <h:panelGrid columns="2">
                    <h:outputText id="lblID" value="ID "/>
                    <h:inputText id="txtID" value="#{personaController.pc.id}"/>
                    <h:outputText id="lblNombre" value="Nombre "/>
                    <h:inputText id="txtNombre" value="#{personaController.pc.nombre}"/>
                    <h:outputText id="lblRol" value="Rol "/>
                    <h:selectOneMenu id="lstRol" value="#{personaController.idRol}">
                        <f:selectItems value="#{rolController.rolSet}"/>
                    </h:selectOneMenu>
                    <h:commandButton id= "cmdguardar" action="#{personaController.create()}" value="Guardar"/>
                </h:panelGrid>
            </h:form>
        </body>
    </html>
</f:view>
